Skip to content

查询剩余待分金额

可调用此接口查询微信支付订单的剩余未分账的金额。

请求参数类型描述
base_uristring声明接入点https://apihk.mch.weixin.qq.com/(香港接入)
transaction_idstring微信订单号
queryobject声明请求的查询参数
sub_mchidstring子商户号
php
$instance->v3->global->profitSharing->transactions->_transaction_id_->amounts->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'transaction_id' => '4208450740201411110007820472',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/global/profit-sharing/transactions/{transaction_id}/amounts')->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'transaction_id' => '4208450740201411110007820472',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/global/profit-sharing/transactions/{transaction_id}/amounts']->getAsync([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'transaction_id' => '4208450740201411110007820472',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->global->profitSharing->transactions->_transaction_id_->amounts->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'transaction_id' => '4208450740201411110007820472',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/global/profit-sharing/transactions/{transaction_id}/amounts')->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'transaction_id' => '4208450740201411110007820472',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/global/profit-sharing/transactions/{transaction_id}/amounts']->get([
  'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
  'transaction_id' => '4208450740201411110007820472',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
transaction_idstring微信订单号
unsplit_amountinteger订单剩余待分金额
currencystring货币类型

参阅 官方文档

Published on the GitHub by TheNorthMemory